<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    {if $auth->city_id == 0}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">城市:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city_id" data-rule="required" data-source="general/lihua_city/index" data-order-by="weigh desc" class="form-control selectpage" name="row[city_id]" type="text" value="">
        </div>
    </div>
    {/if}
    {if $auth->city_id > 0}
    <input id="c-city_id" data-rule="required" data-order-by="weigh desc" class="form-control" name="row[city_id]" type="hidden" value="{:$auth->city_id}">
    {/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <input id="c-type" class="form-control" name="row[type]" type="hidden" value="1">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Starttime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-starttime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[starttime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Endtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-endtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[endtime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">促销配置:</label>
        <div class="col-xs-12 col-sm-8">
            <dl class="fieldlist" data-name="row[goodlist]">
                <dd>
                    <ins>菜单ID</ins>
                    <ins>促销价</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 追加</a>
                </dd>
                <textarea name="row[goodlist]" class="form-control hide" cols="30" rows="5"></textarea>
            </dl>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Day_times')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-day_times" class="form-control" name="row[day_times]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_times')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_times" class="form-control" name="row[order_times]" type="number" value="0">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mutex')}:</label>
        <div class="col-xs-12 col-sm-8">  
            <div class="radio">
                {foreach name="mutexStatus" item="vo"}
                <label for="row[mutex]-{$key}"><input id="row[mutex]-{$key}" name="row[mutex]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">状态:</label>
        <div class="col-xs-12 col-sm-8">  
            <div class="radio">
                {foreach name="statusList" item="vo"}
                <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label> 
                {/foreach}
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">设置参与门店id(多个门店用英文格式的‘|’隔开):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-store_list" class="form-control" name="row[store_list]" type="text" value="">
        </div>
    </div>
    
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
